#ifndef DATABASEMANAGER_H
#define DATABASEMANAGER_H

#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>

class DatabaseManager
{
public:

    static DatabaseManager& instance();

    bool connectToDatabase(); //连接数据库
    bool validateUser(const QString &username,const QString &password); //验证用户登录
private:
    DatabaseManager();
    ~DatabaseManager();
    QSqlDatabase db;
};

#endif // DATABASEMANAGER_H
